package BanyuanClub.Work.Day0305;

import java.io.*;

public class SplitFileN {
    public static void split(File file,int n) {
        for (int i = 0; i < n; i++) {
            try (BufferedInputStream bis =
                         new BufferedInputStream
                                 (new FileInputStream("aaa.txt"));
                 BufferedOutputStream bos =
                         new BufferedOutputStream
                                 (new FileOutputStream
                                         (file.getName().substring
                                                 (0,file.getName().lastIndexOf(","))+"-"+".txt"))
            ){

            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
